package com.aaa.mrcai.controller;

import com.aaa.mrcai.pojo.vo.ForgotPsdVo;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.ForgotPsdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Demo class
 *
 * @Author: Wang
 * @Date: Created in 23:35 2021/12/13
 */
@RestController
@RequestMapping("user")
public class ForgotPsdControl {
    @Autowired
    private ForgotPsdService forgotPsdService;

    @RequestMapping("forgotPsd")
    public AjaxResult forgotPsd (ForgotPsdVo forgotPsdVo){
        return forgotPsdService.forgotPsd(forgotPsdVo);
    }

    @RequestMapping("checkPhone")
    public AjaxResult checkPhone (String telephone){
        return forgotPsdService.isTelephoneExist(telephone);
    }

    @RequestMapping("sendCode")
    public AjaxResult sendCode(String telephone){
        return forgotPsdService.sendCode(telephone);
    }
}
